import React from 'react'
import {HashRouter, Route} from 'react-router-dom'

import App from '../containers'
import Login from '../containers/Login'
import Home from '../containers/Home'
import City from '../containers/City'
import User from '../containers/User'
import Search from '../containers/Search'
import Detail from '../containers/Detail'

class RouterMap extends React.Component{
  render() {
    return (
      <HashRouter>
        <App>
          <Route exact path='/' component={Home}></Route>
          <Route path='/login/:router?' component={Login}></Route>
          <Route path='/city' component={City}></Route>
          <Route path='/user' component={User}></Route>
          <Route exact path='/search/:type/:key?' component={Search}></Route>
          <Route path='/detail/:id' component={Detail}></Route>
        </App>
      </HashRouter>
    )
  }
}

export default RouterMap